package com.lagou.dubbo.customer.controller;

import com.lagou.dubbo.customer.service.RpcTestServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/rpc")
public class RpcTestController {


    @Autowired
    private RpcTestServiceImpl rpcTestService;


    @GetMapping("/{name}")
    public String testRpc(@PathVariable("name") String name) {

        return rpcTestService.sayHolle(name);

    }


    @GetMapping("/test/tp")
    public String testTp() {
        rpcTestService.testTp();
        return "isOk";
    }

}
